package com.linpq.road.service;

import java.util.List;
import com.linpq.common.core.service.CrudService;
        import com.linpq.common.utils.DateUtils;
            import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.linpq.road.mapper.RdRoadLinearityMapper;
import com.linpq.road.domain.RdRoadLinearity;
import com.linpq.common.core.text.Convert;
import com.linpq.common.core.service.BaseService;
/**
 * 路面线性Service业务层处理
 *
 * @author linpq
 * @date 2021-07-29
 */
@Service
public class RdRoadLinearityService  extends CrudService<RdRoadLinearityMapper, RdRoadLinearity> {

    /**
     * 查询路面线性
     *
     * @param id 路面线性ID
     * @return 路面线性
     */

    public RdRoadLinearity selectRdRoadLinearityById(String id) {
        return dao.get(id);
    }

    /**
     * 查询路面线性列表
     *
     * @param rdRoadLinearity 路面线性
     * @return 路面线性
     */

    public List<RdRoadLinearity> selectRdRoadLinearityList(RdRoadLinearity rdRoadLinearity) {
        return dao.findList(rdRoadLinearity);
    }

    /**
     * 新增路面线性
     *
     * @param rdRoadLinearity 路面线性
     * @return 结果
     */

    public int insertRdRoadLinearity(RdRoadLinearity rdRoadLinearity) {
        rdRoadLinearity.setCreateTime(DateUtils.getNowDate());
        return super.save(rdRoadLinearity);
    }

    /**
     * 修改路面线性
     *
     * @param rdRoadLinearity 路面线性
     * @return 结果
     */

    public int updateRdRoadLinearity(RdRoadLinearity rdRoadLinearity) {
                rdRoadLinearity.setUpdateTime(DateUtils.getNowDate());
        return super.save(rdRoadLinearity);
    }

    /**
     * 删除路面线性对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */

    public int deleteRdRoadLinearityByIds(String ids) {
        return dao.deleteRdRoadLinearityByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除路面线性信息
     *
     * @param id 路面线性ID
     * @return 结果
     */

    public int deleteRdRoadLinearityById(String id) {
        return dao.delete(id);
    }
}
